<?php

namespace Marketing\Model\Entity;

class Campaign {
	protected $_id;
	protected $_name;
	protected $_status;
	protected $_supportsrichtext;
	protected $_sendondatetime;
	protected $_fromname;
	protected $_fromaddress;
	protected $_subject;
	protected $_htmlcontent;
	protected $_textcontent;
	protected $_enabletracking;
	protected $_ownedsecurableitem_id;
	protected $_marketinglist_id;


	public function __construct(array $options = null) {
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}

	public function __set($name, $value) {
		$method = 'set' . $name;
		if (!method_exists($this, $method)) {
			throw new Exception('Invalid Method');
		}
		$this->$method($value);
	}

	public function __get($name) {
		$method = 'get' . $name;
		if (!method_exists($this, $method)) {
			throw new Exception('Invalid Method');
		}
		return $this->$method();
	}

	public function setOptions(array $options) {
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}

	public function getId() {
		return $this->_id;
	}

	public function setId($id) {
		$this->_id = $id;
		return $this;
	}

	public function getName() {
		return $this->_name;
	}

	public function setName($name) {
		$this->_name = $name;
		return $this;
	}

	public function getStatus() {
		return $this->_status;
	}

	public function setStatus($status) {
		$this->_status = $status;
		return $this;
	}

	public function getSupportsRichText() {
		return $this->_supportsrichtext;
	}

	public function setSupportsRichText($supportsrichtext) {
		$this->_supportsrichtext = $supportsrichtext;
		return $this;
	}

	public function getSendOnDateTime() {
		return $this->_sendondatetimeondatetime;
	}

	public function setSendOnDateTime($sendondatetime) {
		$this->_sendondatetimeondatetime = $sendondatetime;
		return $this;
	}

	public function getFromName() {
		return $this->_fromname;
	}

	public function setFromName($fromname) {
		$this->_fromname = $fromname;
		return $this;
	}

	public function getFromAddress() {
		return $this->_fromaddress;
	}

	public function setFromAddress($fromaddress) {
		$this->_fromaddress = $fromaddress;
		return $this;
	}
	
	public function getSubject() {
		return $this->_subject;
	}
	
	public function setSubject($subject) {
		$this->_subject = $subject;
		return $this;
	}
	
	public function getHtmlContent() {
		return $this->_htmlcontent;
	}
	
	public function setHtmlContent($htmlcontent) {
		$this->_htmlcontent = $htmlcontent;
		return $this;
	}
	
	public function getTextContent() {
		return $this->_textcontent;
	}
	
	public function setTextContent($textcontent) {
		$this->_textcontent = $textcontent;
		return $this;
	}
	
	public function getEnableTracking() {
		return $this->_enabletracking;
	}
	
	public function setEnableTracking($enabletracking) {
		$this->_enabletracking = $enabletracking;
		return $this;
	}
	
	public function getOwnedSecurableitem_id() {
		return $this->_ownedsecurableitem_id;
	}
	
	public function setOwnedSecurableitem_id($ownedsecurableitem_id) {
		$this->_ownedsecurableitem_id = $ownedsecurableitem_id;
		return $this;
	}
	
	public function getMarketinglist_id() {
		return $this->_marketinglist_id;
	}
	
	public function setMarketinglist_id($marketinglist_id) {
		$this->_marketinglist_id = $marketinglist_id;
		return $this;
	}
	
}
?>
